#define _CRT_SECURE_NO_WARNINGS	

#include <stdio.h>
#include<math.h>
#include<stdbool.h>

bool prime(int x)
{
    for (int i = 2; i <= sqrt(x); i++)
    {
        if (x % i == 0)
            return false;
    }
    return true;
}

int main()
{
    int n;
    scanf("%d", &n);
    int count = 0;
    for (int i = 2; i <= n; i++)
    {
        if (prime(i))
            count++;
    }
    printf("%d\n", count);
}